package com.zx.练习题.emdb;

import java.lang.reflect.Method;

public class MainClass {

    public static void main(String[] args) throws Exception {
        Class<?> aClass = Class.forName("com.zx.练习题.emdb.StartMain");
        Method mainMethod = aClass.getMethod("main", String[].class);
        // 准备参数
        String[] mainArgs = {"参数1", "参数2", "参数3"};
        // 调用main方法
        mainMethod.invoke(null, new Object[]{mainArgs});
    }
}
